import requests

from bs4 import BeautifulSoup
def html_data(res):
    data=res.json().get("description").get("form")
    bs=BeautifulSoup(data,"html.parser")

    url=bs.form.get("action")

    inall=bs.findAll("input")
    dic1={}
    for sig in inall:
        nnn=sig.get("name")
        vvv=sig.get("value")

        dic1[nnn]=vvv

    return [url,dic1]

session=requests.session()
url = "http://121.43.169.97:8081/member/public/login"
form_dict = {"keywords": "18743264760", "password": "qqq123"}
session.post(url=url, data=form_dict)
url1="http://121.43.169.97:8081/trust/trust/register"
res2=session.post(url=url1)

data1=html_data(res2)
print(data1)
res3=session.post(url=data1[0],data=data1[1])
print(res3.text)